<?php 
session_cache_expire(999999999);
if(!isset($_SESSION)) 
{ 
	session_start(); 
}
include '../operations/connection.php';	

$idnotCheck=$_REQUEST['idnotCheck'];
$countnotCheck=$_REQUEST['countnotCheck'];
$notenotCheck=$_REQUEST['notenotCheck'];
$idisCheck=$_REQUEST['idisCheck'];

mysql_query("UPDATE assets SET count=count-".$countnotCheck." WHERE (id='".$idisCheck."')");
mysql_query("UPDATE borrow_assets SET count=count-".$countnotCheck." WHERE (id='".$idnotCheck."')");

mysql_query("INSERT INTO log_borrow_assets (id_borrow_assets, count,datetime,note,creater) 
						VALUES ('".$idnotCheck."', '".$countnotCheck."', NOW(), '".$notenotCheck."', '".$_SESSION['IDEmployee']."')");

mysql_close($connection);
?>